package main

import (
	"log"
	"net/http"
	"test_middle/web"
)

func main() {
	mux := http.NewServeMux()
	mux.HandleFunc("/hello", web.Hello)
	mux.HandleFunc("/cur_time", web.CurrentHandler)

	loggerMux := web.NewLogger(mux)

	addr := "127.0.0.1:8080"
	log.Println("Listening on", addr)
	http.ListenAndServe(addr, loggerMux)
}
